home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
TFC029.422
< prev
next >
Wrap
Text File
|
1993-03-20
|
4KB
|
126 lines
2TFC029.MOD 1Simple Time Bank for WWIV 4.22
The Flying Chicken [SysOp] #1 @12456
3Friday, March 19, 1993 1 6:01 pm
TFC029.MOD - Simple Time Bank for WWIV 4.22
Author : The Flying Chicken
Address: 1@12456 (WWIVLink) 1@2456 (WWIVNet) 1@2456 (IceNet)
Source : WWIV 4.22
Version: 1.0
When Wayne increased the size of the userrec in WWIV 4.22,
he added a new variable called banktime. This mod simply
makes use of that variable. It allows users to store time
in a "bank" to use when they have the need for extra
on-line time (big tranfers and such).
Before using this or any mod, back up your source !!!!!
PKZIP source *.c *.h *.mak
If you mess something up later and want to unstall the mod,
just type:
PKUNZIP source -o
1. Open up BBS.C. Search for mainmenu() and make the changes
shown.
if (strcmp(s,"CLS")==0)
outstr("\f");
if ((strcmp(s,"BANK")==0) && (actsl>40)) { /* ADD */
time_bank(); /* ADD */
}
2. Save BBS.C, and load up UTILITY.C. Add the following
function the end of the file.
void time_bank(void)
{
int mins,done,left;
char ch,s[81];
done=0;
do {
nl();
npr("2Welcome to %s's Time Bank\r\n",syscfg.systemname);0
nl();
pl("21)1 3Deposit Time");0
pl("22) 3Withdraw Time");0
nl();
pl("2Q) 3Quit");0
nl();
left=((int)(nsl()/60))-1;
npr("7You currenlty have %d minutes left for this call.\r\n",left);0
npr("7You currently have %d minutes stored in the bank.\r\n",0
thisuser.banktime);
prt(2,"Your selection? ");
ch=onek("Q12");
switch (ch) {
case 'Q':
done=1;
break;
case '1':
nl();
prt(2,"Deposit how many minutes? ");
input(s,4);
if (s[0]) {
mins=atoi(s);
if (mins) {
if (mins>left) {
prt(6,"You don't have that much time left!");
nl();
} else {
thisuser.banktime+=mins;
thisuser.extratime-=(double)(mins * 60);
write_user(usernum,&thisuser);
prt(6,"Deposited.");
nl();
}
}
}
break;
case '2':
nl();
prt(2,"Withdraw how many minutes? ");
input(s,4);
if (s[0]) {
mins=atoi(s);
if (mins) {
if (mins>thisuser.banktime) {
prt(6,"You don't have that much time in the bank!");
nl();
} else {
thisuser.banktime-=mins;
thisuser.extratime+=(double)(mins * 60);
write_user(usernum,&thisuser);
prt(6,"Withdrawn.");
nl();
}
}
}
break;
}
} while (!done);
nl();
}
3. Now, save UTILITY.C and type MAKE FCNS to load the function
header. If you can't do a MAKE FCNS, get my TFC026 mod,
QUICK!. Until you get the mod, add the following line to
FCNS.H after the comment that reads /* File: utility.c */.
void time_bank(void); /* ADD */
DISCLAIMER: I make no guarantees with this mod whatsoever.
Your installation of the mod is your acceptance of any
damages caused to your hardware or software, incendental or
otherwise.
2 PLEASE REPORT ANY BUGS!0